<template>
  <el-container>
    <el-aside width="200px">
      <MinisterMenu></MinisterMenu>
    </el-aside>

  <el-main style="padding:0px">
    <el-row>
      <el-col :span="8" :offset="2" ><h1 style="float: left">部门成员</h1></el-col>
    </el-row>

        <el-table
            :data="memberList"
            :default-sort="{ prop: 'date', order: 'descending' }"
            style="width: 100%"
        >
          <el-table-column  label="头像" width="180" >
            <template #default="scope">
            <div class="demo-basic--circle">
              <div class="block">
                <el-avatar :size="40" src="http://localhost:8989/static/uploadFiles/headerPics/{{scope.row.userinfo.headerPic}}"/>
              </div>
            </div>
            </template>
          </el-table-column>

          <el-table-column prop="userinfo.name" label="姓名" width="180" :formatter="formatter" />
          <el-table-column prop="userinfo.nickname" label="昵称"  />
          <el-table-column prop="userinfo.email" label="邮箱"  />
          <el-table-column prop="userinfo.phone" label="电话" />
          <el-table-column prop="userinfo.registerTime" label="入职时间"  />
        </el-table>


  </el-main>


  </el-container>
</template>

<script>
import MinisterMenu from "@/components/menu/MinisterMenu";
import instanceToken from "@/utlis/tokenIdentify";
export default {
    name:'UserListView',
    components: {
      MinisterMenu,
    },
    data() {
        return {
           memberList:[],
        };
    },
    methods: {
      initDate(){

        instanceToken.get("/project/minister/getMembers").then(res=>{
          console.log(res.data.data);
          this.memberList = res.data.data;

        })
      },
      formatter(row, column, cellValue, index){
        // this.src = row.
          console.log(row);
          return cellValue;
      }
    },
    created() {
      this.initDate();
    },
    computed: {},
    watch: {},
    }
</script>
<style scoped>
.demo-basic {
  text-align: center;
}
.demo-basic .sub-title {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--el-text-color-secondary);
}
.demo-basic .demo-basic--circle,
.demo-basic .demo-basic--square {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-basic .block:not(:last-child) {
  border-right: 1px solid var(--el-border-color);
}
.demo-basic .block {
  flex: 1;
}
.demo-basic .el-col:not(:last-child) {
  border-right: 1px solid var(--el-border-color);
}
</style>